package com.jy.admin.db.dao;

import com.fqgj.common.base.BaseMapper;
import com.jy.admin.db.entity.BogLogEntity;
import com.jy.admin.db.entity.CeOrdersEntity;
import com.jy.admin.enums.UnPushedListBean;

import java.util.List;

/**
 * User: anonymous
 * Date: 2022-01-03
 * Time: 18:14:20.169
 */

public interface CeOrdersDao extends BaseMapper<CeOrdersEntity> {

    void updateOrderStatus(String agentCode, Integer originStatus, Integer targetStatus);

    List<CeOrdersEntity> getTodayListByStatusAndAgent(String agentCode, Integer status);
    List<CeOrdersEntity> getListByStatusAndAgent(String agentCode, Integer status);

    List<CeOrdersEntity> getTodayListByStatusAndAgentMore(String agentCode, List<Integer> status);

    List<CeOrdersEntity> getTodayListByAgent(String agentCode);

    List<CeOrdersEntity> getTodayListBySyncStatusAndAgent(String agentCode, Integer status);
    List<CeOrdersEntity> getNotSendNoteOrder(String merchantCode);
    List<UnPushedListBean> getUnPushedList(String merchantCode);
    Integer anomalyCount();

    CeOrdersEntity getOneByCollectionNo(String collectionNo);

    CeOrdersEntity getOneByOrderNo(String orderNo);
    CeOrdersEntity getOneByOrderNoAndAgentCode(String orderNo,String agentCode);

    CeOrdersEntity getTodayOneByOrderNo(String orderNo);
    CeOrdersEntity getTodayOneByOrderNoAndAgentCode(String orderNo,String agentCode);
    CeOrdersEntity getTodayOneByOrderNoAndMerchantCode(String orderNo,String merchantCode);

    void updatePendingSendStatusByWaId(Integer sendStatus, String waId);

    void updatePendingRecordStatusByCollectionNo(Integer sendStatus, String collectionNo);

    void updatePendingRecordResultTypeByCollectionNo(Integer resultType, String collectionNo,String result);

    List<BogLogEntity> getNeedPendingOrders();

    void updateCollectionSystemRemainMoney(String tradeNo,String remainMoney);
    void updateCollectionMobile(String tradeNo,String mobile);
    void updateCollectionName(String tradeNo,String name);
    void updateCollectionAppName(String name,String originNo, String clientCode);
    void updateCollectionContactUrl(String url,String originNo, String clientCode);
    void updateImages(String originNo,String newImg,String clientCode);
    void updateAppLink(String originNo,String appLink,String clientCode);
    List<CeOrdersEntity>  getTodayPendingOrder(String status,String syncStatus);
    void updateTodayPendingOrder(Integer status,Integer syncStatus, String orderNo);
    void updateAnomaly();
    void deletedRepaymentOrder();

}